﻿using System.Collections.Generic;
using System.Linq;
using System.Web.Http;
using System.Web.Mvc;
using EasyUILearn.Models;

namespace EasyUILearn.Controllers
{
    public class TreeGridController : Controller
    {
        // GET: TreeGrid
        public ActionResult Index()
        {
            var hrEntities = new HREntities();

            var items = from c in hrEntities.Sys_Companys
                select c;


            return View(items);
        }
    }

    public class TreeGridApi : ApiController
    {


        public IEnumerable<Sys_Companys> GetAllProducts()
        {

            var hrEntities = new HREntities();

            var items = from c in hrEntities.Sys_Companys
                        select c;
            return items;
        }


        

    }
}